package com.qctpos.crm.common.logbackconfig;

import ch.qos.logback.classic.pattern.MessageConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class LogMsgConverter extends MessageConverter {

    @Override
    public String convert(ILoggingEvent event){
        // 获取原始日志
        String requestLogMsg = event.getFormattedMessage();
        return requestLogMsg.replace('\\','/').replace("\"","\\\"");
    }

}